﻿using ConfExpert.Forms.Base;
using DevTeam;
using System;

namespace ConfExpert.Forms.Depo
{
    public partial class InTransitByDate : XForm
    {
        public InTransitByDate(string str)
        {
            InitializeComponent();
            gridView1.Init("GetETA", str);
            gridView1.AddDetailGrid(gridView2, "ETAVarisTarihi");
        }

        private void InTransitByDate_Load(object sender, EventArgs e)
        {
            
            //txtInfo.Caption = AppSession.Lookups.V_Kumas.FindByProductId(ProductId).Name;
            
            gridView1.AddColumn("ArticleCount", typeof(int), "COUNT(Child({FK}).ProductId)");
            gridView1.FormatAsDate("ETAVarisTarihi");
            gridView1.FormatAsNumber(0, "ArticleCount");
            gridView1.AddSummary("ArticleCount");

            gridView2.MakeColumnInvisible("ETAVarisTarihi");
            gridView2.FormatAsNumber(1, "QtyInTransit", "YuklenenMt");
            gridView2.AddSummary("QtyInTransit", "YuklenenMt");

            gridView1.BestFitColumns();
            gridView2.BestFitColumns();
        }
    }
}
